%% build the mex-cpp file by mex command
clc;

PCL_INCLUDE_DIRS = {
  '-I/usr/include/pcl-1.7', ...
};

EIGEN_INCLUDE_DIRS = {
  '-I/usr/include/eigen3', ...
};


%% ======================================================================================== %%
disp('=====================================================================================');
disp('build function levelingPoints2OccupancyGridMex');
disp('=====================================================================================');
opts = {
    % ['-DDEBUG '], ...
    % ['CXXFLAGS="\$CXXFLAGS -std=c++11"'], ... % 
};
src = {
    ['./cpp/levelingPoints2OccupancyGridMex.cpp'], ...
};
mex(...
    opts{:}, ...
    PCL_INCLUDE_DIRS{:}, ...
    EIGEN_INCLUDE_DIRS{:}, ...
    src{:}, ...
    '-outdir', ...
    './mex'); 

%% ======================================================================================== %%
disp('=====================================================================================');
disp('build function laserscanSectorOverlappingMex');
disp('=====================================================================================');
opts = {
    % ['-DDEBUG '], ...
    % ['CXXFLAGS="\$CXXFLAGS -std=c++11"'], ... % 
};
src = {
    ['./cpp/laserscanSectorOverlappingMex.cpp'], ...
};
mex(...
    opts{:}, ...
    PCL_INCLUDE_DIRS{:}, ...
    EIGEN_INCLUDE_DIRS{:}, ...
    src{:}, ...
    '-outdir', ...
    './mex'); 

%% ======================================================================================== %%
disp('=====================================================================================');
disp('build function laserscan2OccupancyGridMex');
disp('=====================================================================================');
opts = {
    % ['-DDEBUG '], ...
    % ['CXXFLAGS="\$CXXFLAGS -std=c++11"'], ... % 
};
src = {
    ['./cpp/laserscan2OccupancyGridMex.cpp'], ...
};
mex(...
    opts{:}, ...
    PCL_INCLUDE_DIRS{:}, ...
    EIGEN_INCLUDE_DIRS{:}, ...
    src{:}, ...
    '-outdir', ...
    './mex'); 

%% ======================================================================================== %%
disp('=====================================================================================');
disp('build function points3dSectorOverlappingMex');
disp('=====================================================================================');
opts = {
    % ['-DDEBUG '], ...
    % ['CXXFLAGS="\$CXXFLAGS -std=c++11"'], ... % 
};
src = {
    ['./cpp/points3dSectorOverlappingMex.cpp'], ...
};
mex(...
    opts{:}, ...
    PCL_INCLUDE_DIRS{:}, ...
    EIGEN_INCLUDE_DIRS{:}, ...
    src{:}, ...
    '-outdir', ...
    './mex'); 
